<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends MY_Controller {

	function __construct()
    {
		// Call the Model constructor
        parent::__construct();
		
		if($this->session->userdata('login') !== TRUE)
			redirect('sessions/login');
		
		date_default_timezone_set("Asia/Jakarta");
    }
	
	public function index()
	{
		$mdl = $this->load->model("group/model_group");
		$id=11;
		$group_id = 1;
		
		$data['group'] = $mdl->get_group_session($id,$group_id);
		// var_dump($data);
		$params['content'] = $this->load->view('welcome_message',$data,TRUE);
		
		echo modules::run('template', $params);
	}
	
	public function not_authorized()
	{
		$this->load->view('template/header_plain');
		$this->load->view('not_authorized');
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */